package com.study.gupao.observer;

import com.google.common.eventbus.EventBus;

/**
 * @ClassName: ObserverTest
 * @Description: 观察者模式测试
 * @author: Administrator
 * @Date: 2019-03-18 14:20
 */
public class ObserverTest {
    public static void main(String[] args) {
        EventBus bus = new EventBus("limx");
        CreateEventer cevent = new Student("limx");
        Question question = cevent.create("我想知道Tom老师是怎么学习Spring，能把Spring源码学的那么透彻？");
        bus.register(new Teacher("Tom"));
        bus.post(new GperSocial("咕泡社区",question));
    }
}
